package com.qfedu.openplateform.manager.service.impl;

import com.qfedu.openplateform.manager.dao.AppInfoMapper;
import com.qfedu.openplateform.manager.entity.AppInfo;
import com.qfedu.openplateform.manager.service.AppInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppInfoServiceImpl implements AppInfoService {

    @Autowired
    private AppInfoMapper appInfoMapper;

    @Override
    public List<AppInfo> findAll() {

        return appInfoMapper.findAll();
    }

    @Override
    public void deleteAppInfo(Integer[] ids) {
        for (int i = 0; i < ids.length; i++) {
            appInfoMapper.deleteAppInfo(ids[i]);
        }
    }

    @Override
    public void add(AppInfo appInfo) {
        appInfoMapper.add(appInfo);
    }

    @Override
    public void update(AppInfo appInfo) {
        appInfoMapper.update(appInfo);
    }

    @Override
    public List<AppInfo> findByLikeName(String corpName) {
        return appInfoMapper.findByLikeName(corpName);
    }
}
